package com.huabo.contract.mysql.mapper;

import com.huabo.contract.mysql.entity.TblYyReportModelMySql;

public class TblYyReportMySqlModelMapperSqlConifg {


	
	public String saveModel(TblYyReportModelMySql model) {
		StringBuffer column = new StringBuffer("INSERT INTO TBL_YY_REPORT_MODEL (REPORTID");
		StringBuffer value = new StringBuffer(" VALUES (HIBERNATE_SEQUENCE.nextval");
		
		if(model.getReportname() != null && !"".equals(model.getReportname())) {
			column.append(",REPORTNAME");
			value.append(",'"+model.getReportname()+"'");
		}
		if(model.getReporturl() != null && !"".equals(model.getReporturl())) {
			column.append(",REPORTURL");
			value.append(",'"+model.getReporturl()+"'");
		}
		if(model.getAnnualprice() != null) {
			column.append(",ANNUALPRICE");
			value.append(",'"+model.getAnnualprice()+"'");
		}
		if(model.getReportprice() != null) {
			column.append(",REPORTPRICE");
			value.append(",'"+model.getReportprice()+"'");
		}
		if(model.getOrgid() != null ) {
			column.append(",ORGID");
			value.append(",'"+model.getOrgid()+"'");
		}
		if(model.getStaffid() != null) {
			column.append(",STAFFID");
			value.append(",'"+model.getStaffid()+"'");
		}
		if(model.getPriceid() != null && !"".equals(model.getPriceid())) {
			column.append(",PRICEID");
			value.append(",'"+model.getPriceid()+"'");
		}
		column.append(")");
		value.append(")");
		String sql = column.toString()+value.toString();
		return sql;
	}


}
